
import api from '@/util/request'
import { PREFIX } from '@/constant/const'

const reimburseUrl = PREFIX.reimburse // 来源报账平台
// 关联交易配置
export function relatedTransactionPage(data) {
  return api.post(`${reimburseUrl}/related-trans-config/page`, data)
}

export function relatedTransactionDetail(id) {
  return api.get(`${reimburseUrl}/related-trans-config/detail/${id}`)
}

export function relatedTransactionAdd(data) {
  return api.post(`${reimburseUrl}/related-trans-config`, data)
}

export function relatedTransactionEdit(data) {
  return api.put(`${reimburseUrl}/related-trans-config`, data)
}

export function relatedTransactionCopy(data) {
  return api.post(`${reimburseUrl}/related-trans-config/copy`, data)
}

export function relatedTransactionBatchDel(ids) {
  return api.delete(`${reimburseUrl}/related-trans-config`, { data: ids })
}

export function relatedTransactionBatchStatus(data) {
  return api.put(`${reimburseUrl}/related-trans-config/enable-status`, data)
}


export function transactionProjectPage(data) {
  return api.post(`${reimburseUrl}/related-trans-project/page`, data)
}

export function transactionProjectDetail(id) {
  return api.get(`${reimburseUrl}/related-trans-project/detail/${id}`)
}

export function transactionProjectAdd(data) {
  return api.post(`${reimburseUrl}/related-trans-project`, data)
}

export function transactionProjectEdit(data) {
  return api.put(`${reimburseUrl}/related-trans-project`, data)
}

export function  transactionProjectBatchDel(ids) {
  return api.delete(`${reimburseUrl}/related-trans-project`, {data: ids })
}

export function  transactionProjectBatchStatus(data) {
  return api.put(`${reimburseUrl}/related-trans-project/enable-status`, data)
}

